#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "../umlcore/PartialElement.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class TemplateParameter;
class TemplateableElement;

/// <summary>
/// TemplateSignature
/// A Template Signature bundles the set of formal TemplateParameters for a
/// template.
/// </summary>
class UMLMODEL_EXPORT TemplateSignature : public PartialElement {

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// ownedParameters getter
    /// The formal parameters that are owned by this TemplateSignature.
    /// </summary>
    vector<shared_ptr<TemplateParameter>>& ownedParameters();

    /// <summary>
    /// parameters getter
    /// The ordered set of all formal TemplateParameters for this TemplateSignature.
    /// </summary>
    vector<shared_ptr<TemplateParameter>>& parameters();

    /// <summary>
    /// template2 getter
    /// The TemplateableElement that owns this TemplateSignature.
    /// </summary>
    shared_ptr<TemplateableElement> template2() const;

    /// <summary>
    /// template2 setter
    /// The TemplateableElement that owns this TemplateSignature.
    /// </summary>
    void setTemplate2(shared_ptr<TemplateableElement> value);

private: // Fields
    /// <summary>
    /// ownedParameters
    /// The formal parameters that are owned by this TemplateSignature.
    /// </summary>
    vector<shared_ptr<TemplateParameter>> ownedParameters_;

    /// <summary>
    /// parameters
    /// The ordered set of all formal TemplateParameters for this TemplateSignature.
    /// </summary>
    vector<shared_ptr<TemplateParameter>> parameters_;

    /// <summary>
    /// template2
    /// The TemplateableElement that owns this TemplateSignature.
    /// </summary>
    shared_ptr<TemplateableElement> template2_;

};

} // namespace uml
